Optimal. Leaf size=200 \[ \frac {a x^2}{2}-\frac {4 b x^{3/2} \tanh ^{-1}\left (e^{i \left (c+d \sqrt {x}\right )}\right )}{d}+\frac {6 i b x \text {PolyLog}\left (2,-e^{i \left (c+d \sqrt {x}\right )}\right )}{d^2}-\frac {6 i b x \text {PolyLog}\left (2,e^{i \left (c+d \sqrt {x}\right )}\right )}{d^2}-\frac {12 b \sqrt {x} \text {PolyLog}\left (3,-e^{i \left (c+d \sqrt {x}\right )}\right )}{d^3}+\frac {12 b \sqrt {x} \text {PolyLog}\left (3,e^{i \left (c+d \sqrt {x}\right )}\right )}{d^3}-\frac {12 i b \text {PolyLog}\left (4,-e^{i \left (c+d \sqrt {x}\right )}\right )}{d^4}+\frac {12 i b \text {PolyLog}\left (4,e^{i \left (c+d \sqrt {x}\right )}\right )}{d^4} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.13, antiderivative size = 200, normalized size of antiderivative = 1.00, number of steps
used = 12, number of rules used = 7, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.438, Rules used = {14, 4290,
4268, 2611, 6744, 2320, 6724} \begin {gather*} \frac {a x^2}{2}-\frac {12 i b \text {Li}_4\left (-e^{i \left (c+d \sqrt {x}\right )}\right )}{d^4}+\frac {12 i b \text {Li}_4\left (e^{i \left (c+d \sqrt {x}\right )}\right )}{d^4}-\frac {12 b \sqrt {x} \text {Li}_3\left (-e^{i \left (c+d \sqrt {x}\right )}\right )}{d^3}+\frac {12 b \sqrt {x} \text {Li}_3\left (e^{i \left (c+d \sqrt {x}\right )}\right )}{d^3}+\frac {6 i b x \text {Li}_2\left (-e^{i \left (c+d \sqrt {x}\right )}\right )}{d^2}-\frac {6 i b x \text {Li}_2\left (e^{i \left (c+d \sqrt {x}\right )}\right )}{d^2}-\frac {4 b x^{3/2} \tanh ^{-1}\left (e^{i \left (c+d \sqrt {x}\right )}\right )}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 14
Rule 2320
Rule 2611
Rule 4268
Rule 4290
Rule 6724
Rule 6744
Rubi steps
\begin {align*} \int x \left (a+b \csc \left (c+d \sqrt {x}\right )\right ) \, dx &=\int \left (a x+b x \csc \left (c+d \sqrt {x}\right )\right ) \, dx\\ &=\frac {a x^2}{2}+b \int x \csc \left (c+d \sqrt {x}\right ) \, dx\\ &=\frac {a x^2}{2}+(2 b) \text {Subst}\left (\int x^3 \csc (c+d x) \, dx,x,\sqrt {x}\right )\\ &=\frac {a x^2}{2}-\frac {4 b x^{3/2} \tanh ^{-1}\left (e^{i \left (c+d \sqrt {x}\right )}\right )}{d}-\frac {(6 b) \text {Subst}\left (\int x^2 \log \left (1-e^{i (c+d x)}\right ) \, dx,x,\sqrt {x}\right )}{d}+\frac {(6 b) \text {Subst}\left (\int x^2 \log \left (1+e^{i (c+d x)}\right ) \, dx,x,\sqrt {x}\right )}{d}\\ &=\frac {a x^2}{2}-\frac {4 b x^{3/2} \tanh ^{-1}\left (e^{i \left (c+d \sqrt {x}\right )}\right )}{d}+\frac {6 i b x \text {Li}_2\left (-e^{i \left (c+d \sqrt {x}\right )}\right )}{d^2}-\frac {6 i b x \text {Li}_2\left (e^{i \left (c+d \sqrt {x}\right )}\right )}{d^2}-\frac {(12 i b) \text {Subst}\left (\int x \text {Li}_2\left (-e^{i (c+d x)}\right ) \, dx,x,\sqrt {x}\right )}{d^2}+\frac {(12 i b) \text {Subst}\left (\int x \text {Li}_2\left (e^{i (c+d x)}\right ) \, dx,x,\sqrt {x}\right )}{d^2}\\ &=\frac {a x^2}{2}-\frac {4 b x^{3/2} \tanh ^{-1}\left (e^{i \left (c+d \sqrt {x}\right )}\right )}{d}+\frac {6 i b x \text {Li}_2\left (-e^{i \left (c+d \sqrt {x}\right )}\right )}{d^2}-\frac {6 i b x \text {Li}_2\left (e^{i \left (c+d \sqrt {x}\right )}\right )}{d^2}-\frac {12 b \sqrt {x} \text {Li}_3\left (-e^{i \left (c+d \sqrt {x}\right )}\right )}{d^3}+\frac {12 b \sqrt {x} \text {Li}_3\left (e^{i \left (c+d \sqrt {x}\right )}\right )}{d^3}+\frac {(12 b) \text {Subst}\left (\int \text {Li}_3\left (-e^{i (c+d x)}\right ) \, dx,x,\sqrt {x}\right )}{d^3}-\frac {(12 b) \text {Subst}\left (\int \text {Li}_3\left (e^{i (c+d x)}\right ) \, dx,x,\sqrt {x}\right )}{d^3}\\ &=\frac {a x^2}{2}-\frac {4 b x^{3/2} \tanh ^{-1}\left (e^{i \left (c+d \sqrt {x}\right )}\right )}{d}+\frac {6 i b x \text {Li}_2\left (-e^{i \left (c+d \sqrt {x}\right )}\right )}{d^2}-\frac {6 i b x \text {Li}_2\left (e^{i \left (c+d \sqrt {x}\right )}\right )}{d^2}-\frac {12 b \sqrt {x} \text {Li}_3\left (-e^{i \left (c+d \sqrt {x}\right )}\right )}{d^3}+\frac {12 b \sqrt {x} \text {Li}_3\left (e^{i \left (c+d \sqrt {x}\right )}\right )}{d^3}-\frac {(12 i b) \text {Subst}\left (\int \frac {\text {Li}_3(-x)}{x} \, dx,x,e^{i \left (c+d \sqrt {x}\right )}\right )}{d^4}+\frac {(12 i b) \text {Subst}\left (\int \frac {\text {Li}_3(x)}{x} \, dx,x,e^{i \left (c+d \sqrt {x}\right )}\right )}{d^4}\\ &=\frac {a x^2}{2}-\frac {4 b x^{3/2} \tanh ^{-1}\left (e^{i \left (c+d \sqrt {x}\right )}\right )}{d}+\frac {6 i b x \text {Li}_2\left (-e^{i \left (c+d \sqrt {x}\right )}\right )}{d^2}-\frac {6 i b x \text {Li}_2\left (e^{i \left (c+d \sqrt {x}\right )}\right )}{d^2}-\frac {12 b \sqrt {x} \text {Li}_3\left (-e^{i \left (c+d \sqrt {x}\right )}\right )}{d^3}+\frac {12 b \sqrt {x} \text {Li}_3\left (e^{i \left (c+d \sqrt {x}\right )}\right )}{d^3}-\frac {12 i b \text {Li}_4\left (-e^{i \left (c+d \sqrt {x}\right )}\right )}{d^4}+\frac {12 i b \text {Li}_4\left (e^{i \left (c+d \sqrt {x}\right )}\right )}{d^4}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.52, size = 260, normalized size = 1.30 \begin {gather*} \frac {a x^2}{2}-\frac {2 b \left (2 d^3 x^{3/2} \tanh ^{-1}\left (\cos \left (c+d \sqrt {x}\right )+i \sin \left (c+d \sqrt {x}\right )\right )-3 i d^2 x \text {PolyLog}\left (2,-\cos \left (c+d \sqrt {x}\right )-i \sin \left (c+d \sqrt {x}\right )\right )+3 i d^2 x \text {PolyLog}\left (2,\cos \left (c+d \sqrt {x}\right )+i \sin \left (c+d \sqrt {x}\right )\right )+6 d \sqrt {x} \text {PolyLog}\left (3,-\cos \left (c+d \sqrt {x}\right )-i \sin \left (c+d \sqrt {x}\right )\right )-6 d \sqrt {x} \text {PolyLog}\left (3,\cos \left (c+d \sqrt {x}\right )+i \sin \left (c+d \sqrt {x}\right )\right )+6 i \text {PolyLog}\left (4,-\cos \left (c+d \sqrt {x}\right )-i \sin \left (c+d \sqrt {x}\right )\right )-6 i \text {PolyLog}\left (4,\cos \left (c+d \sqrt {x}\right )+i \sin \left (c+d \sqrt {x}\right )\right )\right )}{d^4} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.07, size = 0, normalized size = 0.00 \[\int x \left (a +b \csc \left (c +d \sqrt {x}\right )\right )\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Both result and optimal contain complex but leaf count of result is larger than
twice the leaf count of optimal. 534 vs. \(2 (154) = 308\).
time = 0.33, size = 534, normalized size = 2.67 \begin {gather*} \frac {{\left (d \sqrt {x} + c\right )}^{4} a - 4 \, {\left (d \sqrt {x} + c\right )}^{3} a c + 6 \, {\left (d \sqrt {x} + c\right )}^{2} a c^{2} - 4 \, {\left (d \sqrt {x} + c\right )} a c^{3} + 4 \, b c^{3} \log \left (\cot \left (d \sqrt {x} + c\right ) + \csc \left (d \sqrt {x} + c\right )\right ) + 4 \, {\left (-i \, {\left (d \sqrt {x} + c\right )}^{3} b + 3 i \, {\left (d \sqrt {x} + c\right )}^{2} b c - 3 i \, {\left (d \sqrt {x} + c\right )} b c^{2}\right )} \arctan \left (\sin \left (d \sqrt {x} + c\right ), \cos \left (d \sqrt {x} + c\right ) + 1\right ) + 4 \, {\left (-i \, {\left (d \sqrt {x} + c\right )}^{3} b + 3 i \, {\left (d \sqrt {x} + c\right )}^{2} b c - 3 i \, {\left (d \sqrt {x} + c\right )} b c^{2}\right )} \arctan \left (\sin \left (d \sqrt {x} + c\right ), -\cos \left (d \sqrt {x} + c\right ) + 1\right ) + 12 \, {\left (i \, {\left (d \sqrt {x} + c\right )}^{2} b - 2 i \, {\left (d \sqrt {x} + c\right )} b c + i \, b c^{2}\right )} {\rm Li}_2\left (-e^{\left (i \, d \sqrt {x} + i \, c\right )}\right ) + 12 \, {\left (-i \, {\left (d \sqrt {x} + c\right )}^{2} b + 2 i \, {\left (d \sqrt {x} + c\right )} b c - i \, b c^{2}\right )} {\rm Li}_2\left (e^{\left (i \, d \sqrt {x} + i \, c\right )}\right ) - 2 \, {\left ({\left (d \sqrt {x} + c\right )}^{3} b - 3 \, {\left (d \sqrt {x} + c\right )}^{2} b c + 3 \, {\left (d \sqrt {x} + c\right )} b c^{2}\right )} \log \left (\cos \left (d \sqrt {x} + c\right )^{2} + \sin \left (d \sqrt {x} + c\right )^{2} + 2 \, \cos \left (d \sqrt {x} + c\right ) + 1\right ) + 2 \, {\left ({\left (d \sqrt {x} + c\right )}^{3} b - 3 \, {\left (d \sqrt {x} + c\right )}^{2} b c + 3 \, {\left (d \sqrt {x} + c\right )} b c^{2}\right )} \log \left (\cos \left (d \sqrt {x} + c\right )^{2} + \sin \left (d \sqrt {x} + c\right )^{2} - 2 \, \cos \left (d \sqrt {x} + c\right ) + 1\right ) - 24 i \, b {\rm Li}_{4}(-e^{\left (i \, d \sqrt {x} + i \, c\right )}) + 24 i \, b {\rm Li}_{4}(e^{\left (i \, d \sqrt {x} + i \, c\right )}) - 24 \, {\left ({\left (d \sqrt {x} + c\right )} b - b c\right )} {\rm Li}_{3}(-e^{\left (i \, d \sqrt {x} + i \, c\right )}) + 24 \, {\left ({\left (d \sqrt {x} + c\right )} b - b c\right )} {\rm Li}_{3}(e^{\left (i \, d \sqrt {x} + i \, c\right )})}{2 \, d^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int x \left (a + b \csc {\left (c + d \sqrt {x} \right )}\right )\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int x\,\left (a+\frac {b}{\sin \left (c+d\,\sqrt {x}\right )}\right ) \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________